package com.project.web.controller.api;

import com.project.client.service.AreaInfoService;
import com.project.common.core.domain.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/basics")
public class BasicsController {

    @Autowired
    private AreaInfoService areaInfoService;

    //获取省市树形数据
    @GetMapping("/treeList")
    public Result treeList() {
        return Result.success(areaInfoService.tree(2l));
    }


    //获取省市树形数据
    @GetMapping("/treeList2")
    public Result treeList2() {
        return Result.success(areaInfoService.tree(4249l,1l, 2l));
    }
}
